<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/tld/util.tld" prefix="myutil" %>
<!DOCTYPE HTML>
<html>
  <head>
    <title>商品类别管理</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<link href = "/ecp/resources/css/default/base.css" rel = "stylesheet" type = "text/css"/>
    <script type="text/javascript" src="/ecp/resources/js/jquery-1.8.1.js"></script>
    <script type="text/javascript" src="/ecp/resources/js/tydic.js"></script>
     <script type = "text/javascript">
         jQuery(function($) {
			dicPath = '/ecp/resources/css/default/images/';
		});
		
		var cfg = {
                    model : 0,
					url : '/ecp/backstage/sys/role/queryUserManager.do',//分页请求url设置
					head : [//表头设置
					{dis:'选择' , name:'id',width:'2%', align:'left', checked : true},
					{dis:'账号', name:'account', width:'8%', align:'center', sort : {style : false}},
					{dis:'名称', name:'name', width:'8%', align:'center', sort : {style : false}},
					{dis:'角色', name:'rolename', width:'8%', align:'right'},
					{dis:'电话号码', name:'phone', width:'8%', align:'right'},
					{dis:'手机号码', name:'mobile', width:'8%', align:'right'},
					{dis:'创建人', name:'createperson', width:'8%', align:'right'},
					{dis:'创建时间', name:'createtime', width:'8%', align:'right'},
					{dis:'修改人', name:'modperson', width:'8%', align:'right'},
					{dis:'修改时间', name:'modtime', width:'8%', align:'right'},
					{dis:'操作', name:'操作', width:'15%', align:'center'}
					],
					action : [//表格操作设置(修改,删除)
						{name:'修改', fun:function(m){
                              window.location.href="/ecp/backstage/sys/role/toUpdateUser.do?menuId=${param.menuId}&id="+m.id;
                         }, 
                         show:function(m){if (m) return true;}},//表格[修改设置 | 权限设置(显示,需要有返回值)]
						 {name:'删除', fun:function(m){
					    $.ajax({
						   type: "POST",
						   url: "/ecp/backstage/goods/deletetypePage.do",
						   data: "id="+m.id,
						   success: function(msg){
						    if(msg.returnCode==0){
						      //刷新界面
						      queryF();
						    
						      top.$.dicBox({
						        style : 1,
								content : msg.msg//消息内容
								});
								}else{
								   top.$.dicBox({
						        style : 3,
								content : msg.msg//消息内容 
								});
								}
							   }
							})
                          }, 
						 disable:function(m){if (${user.account!='admin'}) return true;}},//表格[删除设置 | 权限设置(置灰,需要有返回值)]
						]
					}
        
            jQuery(function($) {
            
            
                $('#button2').click(queryF);
                var table = $('#datatable2').dicTable(cfg);

                window.parent.layout.left = true;
                window.parent.layout.bottom = true;
                window.parent.layout.draw();
                window.parent.layoutLeft.$('#t').text();
            });
            
           function queryF() {
                     var param = $("#paramForm").serialize();
                     cfg.url = '/ecp/backstage/sys/role/queryUserManager.do?'+param;
                     $('#datatable').html("").append("<div id='datatable2'></div>");;
                     var table = $('#datatable2').dicTable(cfg);
                      
                }
            
		
        </script>
  </head>
  
  <body>
        <myutil:munuPaht menueId='${param.menuId}' />
        <table border = "0" cellspacing = "0" cellpadding = "0">
            <tr>
                <td width = "40"><img src = "/ecp/resources/css/default/images/space.gif" class = "img-search"/></td>
                <td>
                    <form action="" id="paramForm" accept-charset="UTF-8">
                    <table border = "0" cellpadding = "0" cellspacing = "0" class = "searchtab fl">
                        <tbody>
                        <tr>
                            <th>用户账号：</th>
                            <td><input name = "account" type = "text" class = "input90"/></td>
                            <th>用户名称：</th>
                            <td><input name = "name" type = "text" class = "input90"/></td>
                            <td>
                                <input type = "button" name = "button2" id = "button2" value = "查询" class = "btn1"/>
                            </td>
                            <td>&nbsp;
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    </form>
                </td>
            </tr>
        </table>
        <div class = "p10">
            <table width = "100%" border = "0" cellspacing = "0" cellpadding = "0">
                <tr>
                    <td class = "ico21">&nbsp;</td>
                    <td class = "tb">后台用户列表</td>
                    <td class = "ico4">&nbsp;</td>
                </tr>
            </table>
            <table width = "100%" border = "0" cellspacing = "0" cellpadding = "0">
                <tr>
                    <td class = "dataGridtool">
                        <table border = "0" cellspacing = "0" cellpadding = "0" class = "fr">
                            <tr>
                                <td class = "tools1"><a href = "/ecp/backstage/sys/role/toAddUser.do?menuId=${param.menuId}">新增</a></td>
                                <td class = "tools4"><a href = "#">导出</a></td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            <div id="datatable">
                <div id="datatable2"></div>
            </div>
        </div>
    </body>
</html>